package com.aaa.market.exception;

import com.gsj.common.pojo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @program: clms-132
 * @description:
 * @author: 闫克起
 * @create: 2021-07-20 11:43
 **/
//@RestControllerAdvice //处理全局异常的注解
@RestControllerAdvice  //控制层异常处理类
public class GlobalException {

    @ExceptionHandler(value = Exception.class)
    public R exceptionHandler(Exception e){
         e.printStackTrace();//开发看的
          return R.error();

    }
}